package com.gitee.occo.sso.user.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.gitee.occo.sso.user.entity.User;
import com.gitee.occo.sso.user.repository.UserRepository;
import com.gitee.occo.sso.user.service.UserService;

import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;

@Service
public class UserServiceImpl implements UserService {

	@Autowired
	private UserRepository userRepository;

	@Override
	public Mono<User> findById(Long id) {
		// TODO Auto-generated method stub
		return userRepository.findById(id);
	}

	@Override
	public Mono<User> findByUsername(String username) {
		// TODO Auto-generated method stub
		return userRepository.findByUsername(username);
	}

	@Override
	public Flux<User> findByUsernameLike(String username) {
		// TODO Auto-generated method stub
		return userRepository.findByUsernameLike(username);
	}

}
